package com.woniuxy.woniuticket.ordermodule.dao;

import com.woniuxy.woniuticket.movieinfomodule.vo.OderVO;
import com.woniuxy.woniuticket.pojo.CinemaOder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface CinemaOderDAO {

    int deleteByPrimaryKey(String ordernum);

    int insert(CinemaOder record);

    int insertSelective(CinemaOder record);

    CinemaOder selectByPrimaryKey(String ordernum);

    int updateByPrimaryKeySelective(CinemaOder record);

    int updateByPrimaryKey(CinemaOder record);

    //商家查询所有订单
    List<CinemaOder> findallOrders(@Param("currentPage") Integer cpage, @Param("pageSize") Integer psize);

    //用户查询自己的所有订单
    List<CinemaOder> findallOrdersByUser_info_id(@Param("userid")Integer userid,@Param("orderType") Integer orderType);

    //商家查询所有订单,卢川
    List<CinemaOder> queryAllOder(@io.lettuce.core.dynamic.annotation.Param("currentPage") Integer currentpage, @io.lettuce.core.dynamic.annotation.Param("pageSize")Integer pagesize, @io.lettuce.core.dynamic.annotation.Param("vo") OderVO vo);

    //根据排片id找到所有的订单
    List<CinemaOder> findallOrdersByscheduleId(Integer scheduleId);

    //查询日期查询营业额
    BigDecimal findturnover(String today);

    //根据排片id找到所有的订单数量
    Integer findOrdersBySchedule(Integer scheduleId);
}